namespace EyeSoft.Testing.IO
{
	using System.IO;

	using EyeSoft.IO;

	public class RandomFileInfo
		: FileInfoBase
	{
		private readonly string fileName;

		private readonly bool onlyLetters;

		public RandomFileInfo(string fileName, long length, bool onlyLetters)
			: base(fileName, length)
		{
			this.fileName = fileName;
			this.onlyLetters = onlyLetters;
		}

		public override Stream OpenRead()
		{
			return
				new RandomStream(Length, onlyLetters, fileName.GetHashCode());
		}
	}
}